package cn.stylefeng.qz.action.service.impl;

import cn.stylefeng.qz.action.mapper.CategoryMapper;
import cn.stylefeng.qz.business.model.Category;
import cn.stylefeng.qz.action.service.CategoryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
@Slf4j
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> implements CategoryService {

    @Autowired
    private CategoryMapper categoryEntityMapper;

    @Override
    public List<Category> queryAll() {
        return categoryEntityMapper.queryAll();
    }

    @Override
    public List<Category> queryChilds(Category category) {
        return categoryEntityMapper.queryByChilds(category);
    }
}
